<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Bruce Lee</title>
    <meta name="lee" content="电影,电视剧,博客,论坛,编程开发,教育,资源分享,英语学习,英语语法,教学视频,高考,成人,职业教育">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link th:include="header-js">

    <!-- 富文本编辑器 -->
    <link rel="stylesheet" th:href="@{/kindeditor/themes/default/default.css}" />
    <script th:src="@{/kindeditor/kindeditor-all.js}"></script>
    <script charset="utf-8" th:src="@{/kindeditor/lang/zh-CN.js}"></script>

    <script type="text/javascript">
        var editor;
        KindEditor.ready(function(K) {
            editor = K.create('#editor', {
                allowFileManager : true
            });
            console.log('articleContent', editor)
        });
    </script>
</head>
<body class="lay-blog">
<div class="header">
    <div class="header-wrap">
        <div th:include="header"></div>
        <div class="blog-nav pull-right">
            <div th:include="header-nav"></div>
            <a href="#" class="personal pull-left">
                <i class="layui-icon layui-icon-username"></i>
            </a>
        </div>
        <div class="mobile-nav pull-right" id="mobile-nav">
            <a href="javascript:;">
                <i class="layui-icon layui-icon-more"></i>
            </a>
        </div>
    </div>
    <ul class="pop-nav" id="pop-nav">
        <li><a href="/index">首页</a></li>
        <li><a href="/message">留言</a></li>
        <li><a href="/about">关于</a></li>
    </ul>
</div>
<div class="container-wrap">
    <div class="container container-message" style="width: 80%;">
        <div class="contar-wrap" id="contar-wrap">
            <form class="layui-form" th:action="@{'/aritcleUpdateById/'+${articleById.getId()}}" method="post">
                <div class="layui-form-item layui-form-text">
                    <input class="layui-input" type="text" name="articleName" th:value="${articleById.getArticleName()}">
                    <br>
                    <textarea class="layui-textarea" name="articleContent" id="editor" th:utext="${articleById.getArticleContent()}"
                              style="resize:none;height: 600px">

                    </textarea>
                    <div class="item-btn">
                        <input th:type="submit" class="layui-btn layui-btn-normal" id="item-btn" th:value="提交">
                    </div>
                </div>
            </form>

            <!--评论列表-->
            <div id="LAY-msg-box">
                <div class="info-box">
                    <div class="info-item" th:each="o:${message}">
                        <img class="info-img" th:src="@{/images/info-img.jpg}" alt="">
                        <div class="info-text">
                            <p class="title count">
                                <span class="name" th:text="${o.getCreateIp()}"></span>
                                <span class="info-img like">
                                    <!-- 点赞 -->
                                    <a th:href="@{'/commend/'+${o.getId()}}">
                                        <i class="layui-icon layui-icon-praise"></i>
                                        <span th:text="${o.getCommend()}"></span>
                                    </a>
                                    <span>&nbsp;&nbsp;</span>
                                    <!-- 踩 -->
                                    <a th:href="@{'/cai/'+${o.getId()}}">
                                        <i class="layui-icon layui-icon-tread"></i>
                                        <span th:text="${o.getCai()}"></span>
                                    </a>
                                </span>
                            </p>
                            <p class="info-intr" th:text="${o.getMsgTitle()}"></p>
                        </div>
                    </div>
                </div>
            </div>

            <div id="test1" class="paging"></div>
        </div>
    </div>
</div>
<div class="footer">
    <div th:include="food"></div>
</div>
</div>
<script th:src="@{/layui/layui.js}"></script>
<script>
    layui.config({
        base: '../static/js/'
    }).use('blog');
</script>

<script id="LAY-msg-tpl" type="text/html">
    <div class="info-box">
        <div class="info-item">
            <img class="info-img" src="{{ d.avatar }}" alt="">
            <div class="info-text">
                <p class="title">
                    <span class="name">{{ d.username }}</span>
                    <span class="info-img">
					  	<i class="layui-icon layui-icon-praise"></i>
					  	{{ d.praise }}
					 	</span>
                </p>
                <p class="info-intr">
                    {{ d.content }}
                </p>
            </div>
        </div>
    </div>
</script>
</body>
